#include <stdio.h>

int main() {
	char arr[100] = {0};
	int i = 0;
	int n = 0;
	int sum = 0;
	if (fgets(arr, sizeof(arr), stdin)) {
		for (i = 0; arr[i] != '\0' && arr[i] != '\n'; i++) {
			sum += arr[i];
		}
	}
	n = sum & 0xFF;
	printf("%d", n);
	return 0;
}